﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassLibrary.Data;
using ClassLibrary.Entity;
using System.Data;

namespace ClassLibrary.DAO
{
    public class TblInformationDAO
    {
        private DBService _db = null;
        public TblInformationDAO(string ConnectionString)
        {
            _db = new DBService(ConnectionString);
        }
        public bool InsUpdInformation(TblInformation Infor, int mode)
        {
            bool flag = false;
            try
            {
                int result = 0;
                result = _db.ExeSP_NonQuery("sp_TblInformation_InsUp",
                    new string[] { "@idInfor", "@TextHeader", "@TextFooter", "@ImageURLLogo", "@idlanguage", "@mode" },
                    new object[] { Infor.IdInfor, Infor.TextHeader, Infor.TextFooter, Infor.ImageURLLogo, Infor.Idlanguage, mode },
                    CommandType.StoredProcedure);

                flag = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return flag;
        }

    }
}
